using System;

namespace Web7.Core.Configuration
{
    public static class Web7AppConfigurationElementExtensions
    {
        public static Web7AppConfigurationElement App(this Web7AppConfigurationElementCollection apps, Type appType)
        {
            foreach (Web7AppConfigurationElement element in apps)
                if (element.Type.StartsWith(appType.FullName))
                    return element;

            return null;
        }
    }
}